Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LegacySolverWrapper to be compatible with the pyomo script #3202

Merged
merged 7 commits into from
Mar 19, 2024

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

This updates the LegacySolverWrapper to be compatible with the pyomo script.

Changes proposed in this PR:

  • allow _map_config to be called more than once
  • make the report_timing option actually report timing information
  • simplify some of the solver registration infrastructure

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@@ -48,7 +48,7 @@ def test_ipopt_config(self):
self.assertIsInstance(config.executable, ExecutableData)

# Test custom initialization
solver = SolverFactory('ipopt_v2', executable='/path/to/exe')
solver = SolverFactory('ipopt', executable='/path/to/exe')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would test the "old" interface, wouldn't it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope - this PR follows the documentation and leverages the fact that the new interface is registered with the new SolverFactory as ipopt. Previously, the solver interface was being double-registered with the new factory (as both ipopt and ipopt_v2).

@mrmundt mrmundt merged commit c849905 into Pyomo:main Mar 19, 2024
33 checks passed
@jsiirola jsiirola deleted the legacy-solver-updates branch April 4, 2024 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants